package com.lhsy.djcloud.mapper;

import com.lhsy.djcloud.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhsy.djcloud.entity.dto.AccountDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wangzw
 * @since 2020-09-24
 */
public interface UserMapper extends BaseMapper<User> {
    String selectUserNameById(Integer id);

    void deleteByDept(Integer deptId);

    List<User> getNoSelfList(@Param("userId") Integer userId, @Param("tenantId") Integer tenantId);


    List<User> selectByDeptIds(@Param("deptIds") List<Integer> deptIds);

    List<AccountDto> selectAccountList(@Param("userName") String userName, @Param("level") Integer level, @Param("tenantId") Integer tenantId);
}
